<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Fangattr extends Base
{
    //获取数据
    public function getList()
    {
        //获取全部数据
        $data = self::get();
        //调用父类中层级递归函数
        return $this->treeLevel($data);
    }
    //获取器
    public function getIconAttribute()
    {
        return config('url.domain').$this->attributes['icon'];
    }
}
